home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / dos / math / mafia2a / wintg.hlp < prev    next >
Text File  |  1992-10-01  |  12KB  |  275 lines

  1.  
  2.  ╔═══════════════════════════════════════════╗
  3.  ║ WINTG.EXE - Editing the INTG.DAT Database ║       (C) Copyright 1986-1990
  4.  ║ (This program complements RINTG.EXE - The ║             Zvi Shippony
  5.  ║ Integration program)                      ║            (818) 990-0134
  6.  ╚═══════════════════════════════════════════╝
  7.  
  8.   WINTG.EXE program Edit/Add/Delete/Import/Export records from the Integration
  9.   Database (INTG.DAT).
  10.  
  11.   The records in the Database are organized in 3 groups:
  12.  
  13.    1. Algebraic type formulas
  14.    2. Exponential type formulas
  15.    3. Trigonometric type formulas
  16.  
  17. $$
  18.  
  19.   Each record is composed of 5 components as follows:
  20.  
  21.    Itype     (Char)  : A, E or T for Algebraic, Exponential or Trigonometric.
  22.    IntgConst (String): Up to 10 constants,[e.g: in 'xⁿ', n is a constant].
  23.    Integrand (String): The integrand, [e.g: 'xⁿ'].
  24.    Integral  (String): The integral (answer) [ e.g: (x**(n+1))/(n+1) ].
  25.    Constraint(String): Any constraint on the integration interval or the
  26.                        constants, or any comments you wish to state. 'n <> -1'
  27.                        or 'n not equal -1' is a constraint for the above.
  28.                        The constraints are viewed whenever the list of
  29.                        integrands available is shown, and it is up to the user
  30.                        to abide by them.
  31.  
  32.    ** NOTE: The Integral string could not exceed 240 characters.
  33. $$
  34.   The Main menu of WINTG.EXE gives you the following options:
  35.  
  36.    1. List records
  37.    2. Add new record(s)
  38.    3. Edit existing record
  39.    4. Delete existing record
  40.    5. Write records to ASCII file
  41.    6. Import records from an ASCII file
  42.    7. Create a BASIC Integration Database file
  43.    H. Get Help and information about the program
  44.    Q. Quit ...
  45.  
  46.   The Secondary menu (a window) gives you the following options:
  47.  
  48.         A. Algebraic section
  49.  
  50.         B. Exponential section
  51.  
  52.         C. Trigonometric section
  53.  
  54.         <Esc>  - Back to the main menu
  55. $$
  56.   1. List records
  57.   ════════════════
  58.      The secondary menu will appear and you choose what category (type) of
  59.      integrals to view (Algebraic, Exponential or Trigonometric), and then
  60.      a list of all the available integrands in the appropriate section of the
  61.      INTG.DAT (The Integration Database file) will appear as:
  62.  
  63.                 ⌠
  64.              1. │ (xⁿ)dx    (n <> -1)
  65.                 ⌡
  66.                 ⌠
  67.              2. │ (1/Sqrt(a²-x²))dx    (x² <= a²)
  68.                 ⌡
  69.  
  70.      and so on ...
  71. $$
  72.   2. Add new record(s)
  73.   ════════════════════
  74.      The secondary menu will appear and you choose what category (type) of
  75.      integrals to add (Algebraic, Exponential or Trigonometric), and then
  76.      you will be prompt for entry for each of the 5 components above. You can
  77.      continue to add records to that section as long as the integrand is not a
  78.      blank line, thus when you done adding, enter a blank (just hit <Enter>) to
  79.      the 'Enter INTEGRAND' prompt.
  80.  
  81.   ** NOTE: Please study the general note on how the integration works
  82.            (the last section of this introduction) before you attempt to add
  83.            records to the file !!!
  84. $$
  85.   3. Edit existing record
  86.   ═══════════════════════
  87.      The secondary menu will appear and you choose what category (type) of
  88.      integrals to edit (Algebraic, Exponential or Trigonometric), and then
  89.      a listing of all the records from that category will appear. You choose
  90.      one you wish to change, and you'll be prompt for changes in each component
  91.      in turn. Pressing <Esc> at any time will get you out of the Edit mode.
  92.  
  93.      MAKE SURE YOU ENTER THE CORRECT INTEGRAL, THIS WILL BE COMPUTED AS THE
  94.      ANSWER TO THE GIVEN INTEGRAND, (So you better differentiate it to see if
  95.      your entry agrees with the INTEGRAND).
  96.  
  97.   ** NOTE: Please study the general note on how the integration works
  98.            (the last section of this introduction) before you attempt to edit
  99.            records of the file !!!
  100. $$
  101.   4. Delete existing record
  102.   ═════════════════════════
  103.      The secondary menu will appear and you choose what category (type) of
  104.      integrals to delete (Algebraic, Exponential or Trigonometric), and then
  105.      a listing of all the records from that category will appear. You choose
  106.      one you wish to delete. Once an entry is chosen, you will be prompt for
  107.      one more verification of the deletion.
  108. $$
  109.   5. Write records to ASCII file
  110.   ══════════════════════════════
  111.      A secondary menu will appear and you choose what category (type) of
  112.      integrals to write (Algebraic, Exponential or Trigonometric or all of
  113.      them), and then you will be prompted for a file name to write the records
  114.      into. The format of the file will look something like that:
  115.  
  116.         Algebraic                  ─┐
  117.         a                           │
  118.         1/Sqrt(x²+a²)               │ This is one record
  119.         Ln(abs(x+Sqrt(x*x+a*a)))    │
  120.                                    ─┘
  121.         Algebraic        ─┐
  122.         a                 │
  123.         1/(a²-x²)         │ This is one record
  124.         Arctanh(x/a)/a    │
  125.         Abs(x/a) <= 1.0  ─┘
  126.  
  127.       and so on ...
  128.  
  129.    ** Note that when there are no constraint (as in the first record above),
  130.       a blank line appears. Also note that the type (Algebraic) is spelled out,
  131.       even though only the first letter (A) is actually stored.
  132. $$
  133.   6. Import records from an ASCII file
  134.   ═════════════════════════════════════
  135.      The ASCII file has to be in the format as described in the previous
  136.      option. That is, each record has the following format:
  137.  
  138.        A ................................ This is: Itype (Algebraic)
  139.        ac ............................... This is: IntgConst
  140.        1/(ax²+c) ........................ This is: Integrand
  141.        Arctan(x*Sqrt(a/c))/Sqrt(a*c)..... This is: Integral
  142.        a*c > 0.0 ........................ This is: Constraint
  143.                                           (For no constraint, a blank line
  144.                                            MUST appear.)
  145.  
  146.      There should be NO blank lines separating records (A blank constraint line
  147.      is not a separator but actual part of the record)
  148.  
  149.   ** NOTE: Please study the general note on how the integration works
  150.            (the last section of this introduction) before you attempt to
  151.            import records to the file !!!
  152. $$
  153.   7. Create a BASIC Integration Database file
  154.   ═══════════════════════════════════════════
  155.      The BASIC Database file (Named: INTG.DAT) has over 75 different
  156.      integrals, mostly basic stuff (taken from various Math. HandBooks), and
  157.      is intended as a starting point for each user to add to, (using the 'Add'
  158.      option or the 'Import' option) and basically build & enrich the Database
  159.      with the stuff being used the most. The Database can grow indefinitely,
  160.      and once in a while you better make a backup copy (of the modified file)
  161.      just in case somebody (else, of course !) makes a mistake and write over
  162.      it with this option (option 7).
  163. $$
  164.            *******  ADVANCE Editing and Adding options  *******
  165.            ════════════════════════════════════════════════════
  166.  
  167.    When Adding new records, or when Editing the database, we may want to create
  168. an expression which combines 2 or more integrals. For example:
  169.  
  170.      ⌠
  171.      │(Sqrt(ax² + bx +c))dx =  (2ax+b)*Sqrt(ax² + bx +c)/(4a) +
  172.      ⌡                                       ⌠
  173.                              ((4ac-b²)/(8a))*│(1.0/Sqrt(ax² + bx +c))dx
  174.                                              ⌡
  175.      (Constraint: a > 0.0)
  176.  
  177.    Assuming we have the answer to the integral on the right-hand-side, we can
  178. create the answer to the integral on the left-hand-side by using F10 (Merge
  179. option) as follows:   When the prompt: 'Enter the INTEGRAL (The answer)'
  180. appears, enter:
  181.  
  182. (2*a*x+b)*Sqrt(a*x*x+b*x+c)/(4*a)+((4*a*c-b*b)/(8*a))*
  183.  
  184.    and press F10. A window will appear with a listing of all available
  185. integrands in the file, scroll to, and choose the desired one, and its
  186. Integral formula will be concatenated at the cursor, and you will end up with:
  187. $$
  188.  
  189. (2*a*x+b)*Sqrt(a*x*x+b*x+c)/(4*a)+((4*a*c-b*b)/(8*a))*Ln(Sqrt(a*x*x+b*x+c)+x*Sq
  190. rt(a)+0.5*b/Sqrt(a))/Sqrt(a)   (Press <Enter> now ..)
  191.  
  192.    and you have it !!
  193.  
  194.  ** WARNING: Some time the constants involved in the 'imported' (merged)
  195.              integral are not the same as the original one (this is an
  196.              inconsistency) but not to worry, just edit the 'new' constants
  197.              to correspond to the original ones. For example if the second
  198.              integrand above would be: 1.0/Sqrt(nx² + mx +l), you should
  199.              change: 'n' to: 'a', 'm' to: 'b' and: 'l' to: 'c' .
  200.  
  201.  ** NOTE: You can merge (concatenate) as many integrals as you pleased,
  202.           but the total length of the final answer can not exceeds 240
  203.           characters (a warning msg. will appear if this will ever happen).
  204. $$
  205.   General note on how the integration works:
  206.   ══════════════════════════════════════════
  207.   (That is the section I was telling you about all along ..)
  208.  
  209.      Once all the constants has been given a value, (The integration program
  210.      asks for a value for each constant appearing in the IntgConst component),
  211.      they are inserted into the formula of the integral and the computation
  212.      (evaluation) of the integral formula is done twice (once for the upper
  213.      limit and once for the lower limit) and the final answer (the difference
  214.      between the two) is presented.
  215.  
  216.      The matter becomes slightly more complicated in the case of recursive
  217.      integration as in the computation of: xⁿ*Exp(ax) where: a & n are the
  218.      integration constants, (n > 0, integer). If you dump the basic database
  219.      into an ASCII file or if you edit that record, you will see the integral
  220.      formula as:
  221.  
  222.           ((x^n)*Exp(a*x)/a)-(n/a)*Intg(n-1),Intg(n=0)=Exp(a*x)/a
  223.  
  224.      Note the terms: Intg(n-1)  and:  Intg(n=0) !
  225. $$
  226.      Look again:
  227.  
  228.           ((x^n)*Exp(a*x)/a)-(n/a)*Intg(n-1),Intg(n=0)=Exp(a*x)/a
  229.  
  230.      Intg(n-1) tells the program: Do it first with: n reduced by 1,
  231.      thus it all becomes a recursive business !!!
  232.  
  233.      Intg(n=0) tells the program: Stop the recursion when you reach n=0, and
  234.      take the following formula (in this case: Exp(a*x)/a ) as the answer at
  235.      that stage (n=0).
  236. $$
  237.      It could be even more "complicated" when you look on the case:
  238.  
  239.           ⌠
  240.           │(Cos(x)^m)*(Sin(x)^n)dx   (m > 0, n > 0, integers)
  241.           ⌡
  242.  
  243.      Here is how the integral (answer) looks like:
  244.  
  245.  ((cos(x)^(m-1))*(sin(x)^(n+1)))/(m+n)+((m-1)/(m+n))*Intg(m-2),
  246.  Intg(m=0)=-((sin (x)^(n-1))*cos(x))/n+((n-1)/n)*Intg(n-2),
  247.  Intg(m=1)=(sin(x)^(n+1))/(n+1),Intg(n=1)=-cos(x),Intg(n=2)=(x-0.5*sin(2*x))/2
  248.  
  249.    Pretty hairy ah ? but it works exactly in the same way, only that there
  250. are few 'twists' here:
  251.  
  252.    First, since m is reduced by 2 each step,(Intg(m-2)),the recursion could be
  253. stopped at m=0 or m=1, depend what the original (initial) value for m was.
  254. So we have to account for both possibilities and give both Intg(m=0) and
  255. Intg(m=1).
  256.  
  257. $$
  258.    Second, both of the cases, Intg(m=0) and Intg(m=1) are themselves recursive
  259. integrals, both now recursive on the variable: n, and not only that (as if we
  260. don't have enough troubles by now) n is also being reduced by 2 each step
  261. (Intg(n-2)) and we have to supply both cases, Intg(n=0) and Intg(n=1) for the
  262. same reasons.
  263.  
  264.    So - if you mess around with these creatures, you better supply all the
  265. information needed, and do it in exactly the same way it was done above.  Note
  266. that a comma (,) is the separator between formulas and that, at the 'stop
  267. recursion' step, one has to specify the name of the variable, as in: Intg(m=1)
  268. and NOT: Intg(1), since there is possible more then one variable being reduced,
  269. as in the example above.  Even if there is only one 'reducible' variable (as
  270. in: xⁿ*Exp(x)), you still HAVE to specify (n=0) as in: Intg(n=0) !
  271.  
  272.  
  273.  
  274.                             That's all folks ...
  275.